656e67bc06271c5304ed65b3429e05ae39b9d184,opennms-services/src/main/java/org/opennms/netmgt/collectd/HttpCollector.java,HttpCollector,processResponse,#String#HttpCollectionSet#,259
Before Change
List<Attrib> attribDefs = collectionSet.getUriDef().getAttributes().getAttribCollection();
for (Attrib attribDef : attribDefs) {
HttpCollectionAttribute bute = new HttpCollectionAttribute(attribDef.getAlias(),
attribDef.getType(), m.group(attribDef.getMatchGroup()));
log().debug("processResponse: adding found attribute: "+bute);
butes.add(bute);
}
After Change
List<Attrib> attribDefs = collectionSet.getUriDef().getAttributes().getAttribCollection();
for (Attrib attribDef : attribDefs) {
try {
Number num = NumberFormat.getNumberInstance().parse(m.group(attribDef.getMatchGroup()));
HttpCollectionAttribute bute = new HttpCollectionAttribute(attribDef.getAlias(), attribDef.getType(), num);
log().debug("processResponse: adding found attribute: "+bute);
butes.add(bute);
} catch (ParseException e) {
log().error("attribute "+attribDef.getAlias()+" failed to match a parsable number! Matched "+m.group(attribDef.getMatchGroup())+" instead.");
}
}
} else {